﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using TSCC.DataAccess;
using TSCC.Interface;

namespace TSCC.Service
{
    public class Service_Exception
    {
        public DataTable GetExceptionDT()
        {
            DA_Exception obj = new DA_Exception();
            return obj.GetException();
        }

        public List<iCMBItem> GetExceptionItems()
        {
            DA_Exception obj = new DA_Exception();
            DataTable DT = obj.GetException();
            List<iCMBItem> itemList = new List<iCMBItem>();
            foreach (DataRow row in DT.Rows)
            {
                itemList.Add(new CMBItem(
                    row["CATEGORY"].ToString(),row["CATEGORY"].ToString()));  
            }
            return itemList;
        }
    }
}
